
<!DOCTYPE html>
<!--

    Copyright (c) 2017, 2019 Oracle and/or its affiliates. All rights reserved.

    This program and the accompanying materials are made available under the
    terms of the Eclipse Public License v. 2.0, which is available at
    http://www.eclipse.org/legal/epl-2.0.

    This Source Code may also be made available under the following Secondary
    Licenses when the conditions for such availability set forth in the
    Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
    version 2 with the GNU Classpath Exception, which is available at
    https://www.gnu.org/software/classpath/license.html.

    SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0

-->
<!-- Portions Copyright [2019] [Payara Foundation and/or its affiliates] -->
<html lang="en">
  <head>
    <meta charset="utf-8"/>
    <title>recover-transactions</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="css/style.css" rel="stylesheet">
    <script src="https://use.fontawesome.com/96c4d89611.js"></script>
  </head>
  <body>
<table id="doc-title" cellspacing="0" cellpadding="0">
  <tr>
  <td align="left" valign="top">
  <b>recover-transactions</b><br />
  </td>
  </tr>
</table>
<hr />

<table width="90%" id="top-nav" cellspacing="0" cellpadding="0">
	<colgroup>
		<col width="12%"/>
		<col width="12%"/>
		<col width="*"/>
	</colgroup>
	<tr>
		<td align="left">
		<a href="ping-node-ssh.html">
			<span class="vector-font"><i class="fa fa-arrow-circle-left" aria-hidden="true"></i></span>
			<span style="position:relative;top:-2px;">Previous</span>
		</a>
		</td>

		<td align="left">
		<a href="redeploy.html">
			<span class=" vector-font"><i class="fa fa-arrow-circle-right vector-font" aria-hidden="true"></i></span>
			<span style="position:relative;top:-2px;">Next</span>
		</a>
		</td>

		<td align="right">
		<a href="toc.html">
			<span class=" vector-font"><i class="fa fa-list vector-font" aria-hidden="true"></i></span>
			<span style="position:relative;top:-2px;">Contents</span>
		</a>
		</td>
	</tr>
</table>


<div id="preamble">
<div class="sectionbody">
<div class="paragraph">
<p><a id="recover-transactions-1"></a><a id="GSRFM00216"></a><a id="recover-transactions"></a></p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_recover_transactions">recover-transactions</h2>
<div class="sectionbody">
<div class="paragraph">
<p>manually recovers pending transactions</p>
</div>
<div id="sthref1952" class="paragraph">
<p>Synopsis</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="prettyprint highlight"><code class="language-oac_no_warn" data-lang="oac_no_warn">asadmin [asadmin-options] recover-transactions [--help]
[--transactionlogdir transaction_log_dir]
[--target target_server_name] server_name</code></pre>
</div>
</div>
<div id="sthref1953" class="paragraph">
<p>Description</p>
</div>
<div class="paragraph">
<p>The <code>recover-transactions</code> subcommand manually recovers pending
transactions.</p>
</div>
<div class="paragraph">
<p>For an installation of multiple server instances, you can run the
<code>recover-transactions</code> subcommand from a surviving server instance to
recover transactions after a server failure. To use this subcommand in
this way, the following conditions must be met:</p>
</div>
<div class="ulist">
<ul>
<li>
<p>Delegated transaction recovery is disabled.</p>
</li>
<li>
<p>Transaction logs are stored on a shared file system or in a database
that is accessible to all server instances.</p>
</li>
</ul>
</div>
<div class="paragraph">
<p>For a stand-alone server, do not use this subcommand to recover
transactions after a server failure. For a stand-alone server, the
<code>recover-transactions</code> subcommand can recover transactions only when a
resource fails, but the server is still running. If a stand-alone server
fails, only the full startup recovery process can recover transactions
that were pending when the server failed.</p>
</div>
<div class="paragraph">
<p>This subcommand is supported in remote mode only.</p>
</div>
<div id="sthref1954" class="paragraph">
<p>Options</p>
</div>
<div class="dlist">
<dl>
<dt class="hdlist1">asadmin-options</dt>
<dd>
<p>Options for the <code>asadmin</code> utility. For information about these
options, see the <a href="asadmin.html#asadmin-1m"><code>asadmin</code>(1M)</a> help page.</p>
</dd>
<dt class="hdlist1"><code>--help</code></dt>
<dt class="hdlist1"><code>-?</code></dt>
<dd>
<p>Displays the help text for the subcommand.</p>
</dd>
<dt class="hdlist1"><code>--transactionlogdir</code></dt>
<dd>
<p>The location of the transaction logs for a server for which
transaction recovery is requested. This option applies only if
transaction logs are stored on a shared file system.</p>
</dd>
<dt class="hdlist1"><code>--target</code></dt>
<dd>
<p>The target server that performs the recovery for the server that is
specified by the server_name operand. The target server should be
running.</p>
</dd>
<dt class="hdlist1"><code>--destination</code></dt>
<dd>
<p>This option is deprecated. It works exactly as the <code>--target</code> option
does.</p>
</dd>
</dl>
</div>
<div id="sthref1955" class="paragraph">
<p>Operands</p>
</div>
<div class="dlist">
<dl>
<dt class="hdlist1">server_name</dt>
<dd>
<p>For a stand-alone server, the value of this operand is typically
<code>server</code>. Transactions are recovered only if a resource fails, but the
server is still running.<br>
For an installation of multiple server instances, the value of this
operand is the name of the server for which the recovery is required.
The in-flight transactions on this server will be recovered. If this
server is running, recovery is performed by the same server. In this
situation, the <code>--transactionlogdir</code> and <code>--target</code> options should be
omitted. If the server is not running, the <code>--target</code> option is
required, and the <code>--transactionlogdir</code> option is also required if
transaction logs are stored on a shared file system.</p>
</dd>
</dl>
</div>
<div id="sthref1956" class="paragraph">
<p>Examples</p>
</div>
<div class="paragraph">
<p><a id="GSRFM733"></a><a id="sthref1957"></a></p>
</div>
<div class="paragraph">
<p>Example 1   Recovering transactions on a running server</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="prettyprint highlight"><code class="language-oac_no_warn" data-lang="oac_no_warn">% asadmin recover-transactions server1
Transaction recovered.</code></pre>
</div>
</div>
<div class="paragraph">
<p><a id="GSRFM734"></a><a id="sthref1958"></a></p>
</div>
<div class="paragraph">
<p>Example 2   Recovering transactions for a server that is not running</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="prettyprint highlight"><code class="language-oac_no_warn" data-lang="oac_no_warn">% asadmin recover-transactions --transactionlogdir /logs/tx --target server1 server2
Transaction recovered.</code></pre>
</div>
</div>
<div id="sthref1959" class="paragraph">
<p>Exit Status</p>
</div>
<div class="dlist">
<dl>
<dt class="hdlist1">0</dt>
<dd>
<p>command executed successfully</p>
</dd>
<dt class="hdlist1">1</dt>
<dd>
<p>error in executing the command</p>
</dd>
</dl>
</div>
<div id="sthref1960" class="paragraph">
<p>See Also</p>
</div>
<div class="paragraph">
<p><a href="asadmin.html#asadmin-1m"><code>asadmin</code>(1M)</a></p>
</div>
<div class="paragraph">
<p><a href="freeze-transaction-service.html#freeze-transaction-service-1"><code>freeze-transaction-service</code>(1)</a>,
<a href="rollback-transaction.html#rollback-transaction-1"><code>rollback-transaction</code>(1)</a>,
<a href="unfreeze-transaction-service.html#unfreeze-transaction-service-1"><code>unfreeze-transaction-service</code>(1)</a></p>
</div>
<div class="paragraph">
<p>"<a href="https://eclipse-ee4j.github.io/jakartaee-tutorial/transactions.html">Transactions</a>"
in The Java EE 8 Tutorial</p>
</div>
</div>
</div>

<hr />

<table width="90%" id="bottom-nav" cellspacing="0" cellpadding="0">
	<colgroup>
		<col width="12%"/>
		<col width="12%"/>
		<col width="*"/>
	</colgroup>
	<tr>		
		<td align="left">
		<a href="ping-node-ssh.html">
			<span class=" vector-font"><i class="fa fa-arrow-circle-left" aria-hidden="true"></i></span>
			<span style="position:relative;top:-2px;">Previous</span>
		</a>
		</td>

		<td align="left">
		<a href="redeploy.html">
			<span class="vector-font"><i class="fa fa-arrow-circle-right vector-font" aria-hidden="true"></i></span>
			<span style="position:relative;top:-2px;">Next</span>
		</a>
		</td>

		<td align="right">
		<a href="toc.html">
			<span class="vector-font"><i class="fa fa-list vector-font" aria-hidden="true"></i></span>
			<span style="position:relative;top:-2px;">Contents</span>
		</a>
		</td>
	</tr>
</table>

<span id="copyright">
        <img src="/resource/reference/img/eclipse_foundation_logo_tiny.png" height="20px" alt="Eclipse Foundation Logo" align="top"/>&nbsp;            
        <span >Copyright&nbsp;&copy;&nbsp;2019,&nbsp;Oracle&nbsp;and/or&nbsp;its&nbsp;affiliates.&nbsp;All&nbsp;rights&nbsp;reserved.</span>
</span>

</body>
</html>
